import java.rmi.UnmarshalException;
import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2024-03-08
 * Time: 8:38
 */
class Student {
    public String name;
    public int age;

    public Student(String name,int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

}

public class Test {
    public static void main(String[] args) {

    }

    /*public static void main2(String[] args) {
        Student[] students = new Student[3];
        students[0] = new Student("小明",15);
        students[1] = new Student("小红",16);
        students[2] = new Student("小刚",17);
        System.out.println(Arrays.toString(students));
        NameComparator nameComparator = new NameComparator();
        Arrays.sort(students,nameComparator);
        System.out.println(Arrays.toString(students));
    }*/

    /*public static void main1(String[] args) {
        Student student1 = new Student("小明",10);
        Student student2 = new Student("小宏",9);

        AgeComparator ageComparator = new AgeComparator();
        int ret = ageComparator.compare(student1,student2);
        System.out.println(ret);

        NameComparator nameComparator = new NameComparator();
        int ret2 = nameComparator.compare(student1,student2);
        System.out.println(ret2);
    }*/
}
